package exo1;
/**
 * 
 */

/**
 * @author fcamps
 *
 */
public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Figure tab []= new Figure[5];

		tab[0] = new TriangleEquilateral(3, 4);

		tab[0].afficherCaracteristiques();
		System.out.println("perimetre = " + tab[0].perimetre());

		tab[1] = new Carre(3);
		tab[2] = new Carre(5);
		tab[3] = new CercleColore(2.5);

		if(tab[0] instanceof TriangleEquilateral)
		{
			tab[0].afficherCaracteristiques();
		}
		
		// pour vérifier la destruction des objets
		
		tab[0] = null;
		tab[1] = null;
		tab[2] = null;
	
		System.gc();
		
		File myFile =  new File();
		
		myFile.addElement(new Carre(3));
		myFile.addElement(new TriangleEquilateral(3, 4));
		
		myFile.listElement();
		
	}
}
